<p class="developer">相册的编辑功能也以后再做。</p>
<div class="box">
    <div class="hd">相册管理 &darr;</div>
    <div class="bd">
        <table class="itbale">
            <tr>
                <td>数据库主键编号</td>
                <td>相册封面</td>
                <td>相册名称</td>
                <td>相册简介</td>
                <td>操作</td>
            </tr>
            <?php
            foreach ($album_array as $key => $val) {
                $del_url = site_url("admin/photo_manag/del_album/{$val["id"]}");
                $base_url = base_url();
                $thum_url = $base_url . "/uploads/album/thum";
//           if($val["id"]==39){
//               ...那么不显示相册删除
//           }
                if (($val["type"] == 2) || ($val["type"] == 3)) {
                    echo "   
      <tr>
        <td>{$val["id"]}</td>
        <td><img src=\"{$thum_url}/{$val["cover"]}\" /></td>
        <td>{$val["title"]}</td>
        <td>{$val["desc"]}</td>
        <td>系统默认图片分类</td>
      </tr>";
                } else {
                    echo "   
      <tr>
        <td>{$val["id"]}</td>
        <td><img src=\"{$thum_url}/{$val["cover"]}\" /></td>
        <td>{$val["title"]}</td>
        <td>{$val["desc"]}</td>
        <td><a href=\"{$del_url}\" title=\"删除\">删除</a> | " . anchor('admin/photo_manag/edit_photoAlbum/' . $val["id"], '编辑', 'class="edit"') . "</td>
      </tr>";
                }
              
            }
            ?>
        </table>
    </div>
</div>
<div class="box">
    <div class="hd">某个相册下的图片列表  (点击分类名称，查看和管理该分类下的视频)&darr;<span>默认显示第一个照片类别的列表了:)</span></div>
    <div class="catList">
        <?php
        foreach ($album_array as $key => $val) {
            $options[$val["id"]] = $val["title"];
            $url = site_url("admin/photo_manag/index/{$val["id"]}");
            echo " <a href=\"{$url}\" title=\"{$val["title"]}\">{$val["title"]}</a> ";
        }
        ?>
    </div>
    <?php
    //print_r($photo_array);
    ?>
    <div class="bd"> <?php echo form_open('admin/photo_manag/edit_photo_bat'); ?>
        <div class="caozuo"> 针对已选图片: <?php //echo form_dropdown('cAction', array(0 => '=选择动作=', 1 => '批量修改-名称', 2 => '批量修改-类别', 3 => '批量修改-简介', 7 => '批量修改-排序', 4 => '批量修改-以上全部', 5 => '批量删除'), 0, 'id="cAction"'); ?>
            <input type="hidden" name="redirectURL" value="<?php echo uri_string(); ?>" />
            <?php echo form_submit('edit_photosSubmit', '确定执行'); ?> </div>
        <table class="itbale">
            <tr>
                <td>勾选后可提交修改</td>
                <td width="200">照片缩略图</td>
                <td>照片名称</td>
                <td>照片所属类别</td>
                <td>照片简介</td>
                <td>图片排序</td>
                <td>操作</td>
            </tr>
            <?php
            $base_url = base_url();
            $thum_url = $base_url . "/uploads/photos/thum";
            foreach ($photo_array as $key => $value) {
                $del_url = site_url("admin/photo_manag/del_photo/{$value["id"]}");
                $album_id = "album_id" . $value['id'];
                $select_html = form_dropdown($album_id, $options, $value["album_id"]);


                echo "   <tr>
        <td>" . form_checkbox(array('name' => 'photo_id[]', 'value' => $value['id'], 'checked' => FALSE, 'class' => 'photo_id',)) . "</td>
        <td><img src=\" {$thum_url}/{$value["path"]}\" height=\"100\"></td>
	   <td><input type=\"text\" size=\"20\" name=\"title{$value["id"]}\" value=\"{$value["title"]}\" /></td>
	   <td>{$select_html}</td>
        <td><textarea rows=\"3\" cols=\"20\" name=\"desc{$value["id"]}\">{$value["desc"]}</textarea></td>
		<td><input type=\"text\" size=\"3\" name=\"order{$value["id"]}\" value=\"{$value["order"]}\" /></td>
                    
<td><a title=\"删除\" href=\" {$del_url}\">删除</a></td>
      </tr>";
            }
            ?>
        </table>
            <?php echo form_close(); ?> </div>
</div>
